<?php
$this->frontend_lib->setACss(
    array(
        shop_assets('css/owl.carousel.css', $this->shop->template), 
        shop_assets('css/owl.theme.css', $this->shop->template)
        )
    );
$this->frontend_lib->setAJs(shop_assets('js/owl.carousel.min.js', $this->shop->template));
?>

<div class="row">
    <div class="col-lg-3 col-md-3 col-sm-12">
        <?php echo get_theme_item('sidebar', NULL, $shop->template); ?>
    </div>

    <!--right column-->
    <div class="col-lg-9 col-md-9 col-sm-12">        
        <div class="w100">
            <?php if(isset($shop_slides) && count($shop_slides)>0) { ?>
            <div id="banner-carousel" class="owl-carousel">
                <?php foreach($shop_slides as $index=>$oImage) { ?>
                <div class="slider-item slider-item-img<?php echo $index; ?>"><img src="<?php echo slide_upload($oImage->image, $oImage->image_folder, FALSE); ?>" alt="" /></div>
                <?php } ?>
            </div>
            <?php } ?>
        </div>
        
        <!--/.category-top-->
        <div class="w100 categoryFooter">
            <div class="pagination pull-left no-margin-top">
                <?php echo $pagingBar; ?>
            </div>
            <div class="pull-right pull-right col-sm-4 col-xs-12 no-padding text-right text-left-xs">
                <p>Hiển thị <?php echo $this->mypaging->getCurOffset(); ?>–<?php echo $this->mypaging->getCurOffset() - 1 + $this->mypaging->getCurPageOffsetCount(); ?> of <?php echo $this->mypaging->getCount(); ?> kết quả</p>
            </div>
        </div>
        <!--/.categoryFooter-->

        <div class="w100 productFilter clearfix">
            <p class="pull-left"> Hiển thị <strong><?php echo $this->mypaging->getCurPageOffsetCount(); ?></strong> sản phẩm </p>
            <div class="pull-right ">
                <div class="change-order pull-right">
                    <select class="form-control" name="orderby">
                        <option selected="selected" >Default sorting</option>
                        <option value="popularity">Sort by popularity</option>
                        <option value="rating">Sort by average rating</option>
                        <option value="date">Sort by newness</option>
                        <option value="price">Sort by price: low to high</option>
                        <option value="price-desc">Sort by price: high to low</option>
                    </select>
                </div>
                <div class="change-view pull-right"> <a href="#" title="Grid" class="grid-view"> <i class="fa fa-th-large"></i> </a> <a href="#" title="List" class="list-view "><i class="fa fa-th-list"></i></a> </div>
            </div>
        </div>
        <!--/.productFilter-->

        <div class="row categoryProduct xsResponse clearfix">
            <!-- list item -->
            <?php
            foreach ($aProduct as $index=>$product) {
                if($index < SHOPECO_HOME_PRODUCT_LIMIT){
                    $product->new_flg = ON;
                }
                $this->load->view('shop-themes/shopeco/layout/product-item.html.php', array('product'=>$product));
            }
            ?>
        </div>
    </div>
    <!--/right column end-->
</div>
<!-- /.row  -->